package com.itheima.work1117;

public class ShowHandlerDemo {

    public void useStringHandler(StringHandler handler){
        handler.printMessage("Hello java");
    }

    public static void main(String[] args) {

        ShowHandlerDemo demo = new ShowHandlerDemo();
        //匿名内部类简化
        StringHandler handler = (message)->
                System.out.println("兰姆达已实现");
        demo.useStringHandler(handler);



    }
}




